package com.bisp.bgame;

import java.io.File;

import android.app.NotificationManager;
import android.app.Notification;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;

import com.phonegap.*;

public class GameActivity extends DroidGap{
	   public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        Intent intent = getIntent();
	        Bundle b = intent.getExtras();
	        String gameID = b.getString("gameID");
	        
	        Log.v("Allven","file://"+getSDPath()+"/Bgame/"+gameID+"/index.html");
	        //super.loadUrl("file:///android_asset/www/login.html");
	        
	        super.loadUrl("file://"+getSDPath()+"/Bgame/"+gameID+"/index.html");
	        //super.loadUrl("file:///sdcard/Bgame/"+gameID+"/index.html");
	        //super.loadUrl("http://172.19.100.140:8080/Bgame/Login.html");
	       // this.root.setBackgroundResource(R.drawable.loading);
	        this.root.setBackgroundResource(R.drawable.loading);
	    }
	   public String getSDPath(){ 
	        File sdDir = null;                                 
	        sdDir = Environment.getExternalStorageDirectory();
	        //sdDir = Environment.getRootDirectory();
	        return sdDir.toString(); 
	        
	    }
}
